package com.share.bean.oa.org;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * <p>Title：离职日期、离职原因</p>
 * <p>Description：</p>
 * @Author：杨浩泉
 * @Date：2010-4-27
 */
@Entity
@Table(name="share_oa_empDimission")
public class EmpDimission {
	
	private int id ;
	
	/** 离职日期 */
	private Date dimissionDate ;
	
	/** 离职原因 */
	private String dimissionCause ;
	
	/** 员工离职原因与员工信息一对一关系，维护端为员工 */
	private Employee employee ;

	public String getDimissionCause() {
		return dimissionCause;
	}

	@Temporal(TemporalType.DATE)
	public Date getDimissionDate() {
		return dimissionDate;
	}

	@OneToOne(mappedBy="dimissionMsg",cascade=CascadeType.REFRESH)
	@JoinColumn(name="dimis_id")
	public Employee getEmployee() {
		return employee;
	}

	@Id @GeneratedValue
	public int getId() {
		return id;
	}
	
	public void setDimissionCause(String dimissionCause) {
		this.dimissionCause = dimissionCause;
	}

	public void setDimissionDate(Date dimissionDate) {
		this.dimissionDate = dimissionDate;
	}

	
	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public void setId(int id) {
		this.id = id;
	}

}
